A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
1. Field of the Invention
The present invention relates generally to a system providing methods for facilitating development and maintenance of software applications or systems, with particular emphasis on providing a fixed Unified Modeling Language (UML) layout for an object oriented class browser.
2. Description of the Background Art
Before a digital computer may accomplish a desired task, it must receive an appropriate set of instructions. Executed by the computer""s microprocessor, these instructions, collectively referred to as a xe2x80x9ccomputer program,xe2x80x9d direct the operation of the computer. Expectedly, the computer must understand the instructions which it receives before it may undertake the specified activity.
Owing to their digital nature, computers essentially only understand xe2x80x9cmachine code,xe2x80x9d i.e., the low-level, minute instructions for performing specific tasksxe2x80x94the sequence of ones and zeros that are interpreted as specific instructions by the computer""s microprocessor. Since machine language or machine code is the only language computers actually understand, all other programming languages represent ways of structuring human language so that humans can get computers to perform specific tasks. While it is possible for humans to compose meaningful programs in machine code, practically all software development today employs one or more of the available programming languages. The most widely used programming languages are the xe2x80x9chigh-levelxe2x80x9d languages, such C, Pascal, or more recently Java. These languages allow data structures and algorithms to be expressed in a style of writing that is easily read and understood by fellow programmers.
A program called a xe2x80x9ccompilerxe2x80x9d translates these instructions into the requisite machine language. In the context of this translation, the program written in the high-level language is called the xe2x80x9csource codexe2x80x9d or source program. The ultimate output of the compiler is a compiled module such as a compiled C xe2x80x9cobject module,xe2x80x9d which includes instructions for execution ultimately by a target processor, or a compiled Java class, which includes bytecodes for execution ultimately by a Java virtual machine. A Java compiler generates platform-neutral xe2x80x9cbytecodesxe2x80x9dxe2x80x94an architecturally neutral, intermediate format designed for deploying application code efficiently to multiple platforms.
Java bytecodes are designed to be easy to interpret on any machine. Bytecodes are essentially high-level, machine-independent instructions for a hypothetical or xe2x80x9cvirtualxe2x80x9d machine that is implemented by the Java interpreter and runtime system. The virtual machine, which is actually a specification of an abstract machine for which a Java language compiler generates bytecode, must be available for the various hardware/software platforms which an application is to run. The Java interpreter executes Java bytecode directly on any machine for which the interpreter and runtime system of Java have been ported. In this manner, the same Java language bytecode runs on any platform supported by Java.
Conventionally, creation of a software program or system includes creation of individual source code modules. This approach simplifies program development by dividing functionality available in the program into separate source modules. When multiple source modules are employed for creating a program, interdependencies between the individual modules often exist. Program logic in one module can, for instance, reference variables, methods, objects, and symbols imported from another module. By the very same token, that module can also export its own methods, objects, and symbols, making them available for use by other modules.
xe2x80x9cVisualxe2x80x9d development environments, such as Borland""s JBuilder(copyright), are the preferred application development environments for quickly creating production applications. Such environments are characterized by an integrated development environment (IDE) providing a form painter, a property getter/setter manager (xe2x80x9cinspectorxe2x80x9d), a project manager, a tool palette (with objects which the user can drag and drop on forms), an editor, and a compiler. In general operation, the user xe2x80x9cpaintsxe2x80x9d objects on one or more forms, using the form painter. Attributes and properties of the objects on the forms can be modified using the property manager or inspector. In conjunction with this operation, the user attaches or associates program code with particular objects on screen (e.g., button object); the editor is used to edit program code which has been attached to particular objects. After the program code has been developed, the compiler is used to generate binary code (e.g., Java bytecode) for execution on a machine (e.g., a Java virtual machine).
Although visual development environments enable applications to be created quickly, problems remain with the development, implementation, and maintenance of software applications. In an object oriented development environment, software applications are developed as a set of objects and classes that interact with one another. It is difficult for developers to use those objects and classes unless they fully understand the relationships between them. For example, to change the name of a method in a Java application a developer has to find all classes that invoke the method, so that the invocations of the method are updated accordingly. All told, application developers and other users are required to understand complex relationships between components of software systems in order to develop, implement, and maintain such systems.
In order to better understand the relationships between objects and their classes a number of current development tools provide a class browser which allows navigating between the individual classes of a software system or application. However, a class browser usually displays only the inheritance relationships between classes, which is only one of several relationships that exist between classes. Current class browsers do not provide higher level diagrams that enable developers to understand all of the complex relationships between classes of a system.
A current technology for understanding complex object oriented software systems is the Unified Modeling Language (UML). UML is a standard graphical language for modeling object-oriented systems. For further information on UML, see e.g., xe2x80x9cOMG Unified Modeling Language Specification (Version 1.4, September 2001)xe2x80x9d available from the Object Management Group, Inc., the disclosure of which is hereby incorporated by reference. A copy of this specification is currently available via the Internet at www.omg.org. UML, at its simplest, is a language that graphically describes a set of elements. At its most complex, UML is used to specify, visualize, construct, and document not only software systems but also business models and non-software systems. Much like a blueprint for constructing a building, UML provides a graphical representation of a system design that may be used by developers to assure architectural soundness of a system. UML is frequently used to design the relationships between components (e.g., classes in the case of a Java program) before such components are developed and implemented in source code format.
A number of UML design tools are available for use in conjunction with the design and development of a software system. However, these current UML design tools are focused on system design and are not integrated with a class browser. Typically a developer uses a UML design tool for system design, but uses a separate development tool for developing the source code modules necessary to implement the system from the design. Because the UML design tools and development tools are not integrated, the UML diagrams are not updated to reflect the actual design of the system as implemented. In addition, current UML tools do not provide easy access to the underlying source code of the system during the development process or after the system is implemented.
Some current tools provide functionality for xe2x80x9creverse engineeringxe2x80x9d (i.e., generating) UML diagrams from given a set of source code files (e.g., Java source files). However, these tools typically require the source code to be read in and parsed in response to a request to generate a UML diagram of a particular program. They do not provide immediate access to the UML diagrams of the program. Another limitation of this approach is that the tools are not integrated with a class browser to provide a developer with the ability to easily navigate from a UML diagram to the associated source code of a software system (and vice versa).
An integrated solution is needed that enables developers to better utilize UML diagrams in designing, developing, and maintaining complex software systems. The solution should provide UML diagrams of implemented systems together with the ability to easily access the underlying source code of such systems, preferably using a class browser to facilitate such access. The present invention fulfills these and other needs.
The following definitions are offered for purposes of illustration, not limitation, in order to assist with understanding the discussion that follows.
Bytecode: A virtual machine executes virtual machine low-level code instructions called xe2x80x9cbytecodes.xe2x80x9d Both the Sun Microsystems Java virtual machine and the Microsoft.NET virtual machine provide a compiler to transform the respective source program (i.e., a Java program or a C# program, respectively) into virtual machine bytecodes.
Compiler: A compiler is a program which translates source code into binary code to be executed by a computer. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instructions. Thus, a compiler differs from an interpreter which analyzes and executes each line of code in succession, without looking at the entire program. A Java compiler translates source code written in the Java programming language into bytecode for the Java virtual machine.
Interpreter: An interpreter is a module that alternately decodes and executes every statement in some body of code. A Java runtime interpreter decodes and executes bytecode for the Java virtual machine.
Java: Java is a general purpose programming language developed by Sun Microsystems. Java is an object-oriented language similar to C++, but simplified to eliminate language features that cause common programming errors. Java source code files (files with a .java extension) are compiled into a format called bytecode (files with a .class extension), which can then be executed by a Java interpreter. Compiled Java code can run on most computers because Java interpreters and runtime environments, known as Java virtual machines (VMs), exist for most operating systems, including UNIX, the Macintosh OS, and Windows. Bytecode can also be converted directly into machine language instructions by a just-in-time (JIT) compiler. Further description of the Java Language environment can be found in the technical, trade, and patent literature; see e.g., Gosling, J. et al., xe2x80x9cThe Java Language Environment: A White Paper,xe2x80x9d Sun Microsystems Computer Company, October 1995, the disclosure of which is hereby incorporated by reference.
UML: UML standards for the Unified Modeling Language, a standard graphical language for modeling object-oriented systems. For further information on UML, see e.g., xe2x80x9cOMG Unified Modeling Language Specification (Version 1.4, September 2001)xe2x80x9d available from the Object Management Group, Inc., the disclosure of which is hereby incorporated by reference. A copy of this specification is currently available via the Internet at www.omg.org.
A method for generating a Unified Modeling Language (UML) diagram of a program for display in a graphical user interface of a development system is described. Relationships between a plurality of files of a program are determined using a compiler. When a request for display of a Unified Modeling Language (UML) diagram is received from a user, the file currently displayed (or selected) in the graphical user interface is automatically determined. A UML diagram of the currently selected file is generated based upon the determined relationships between files of the program. The UML diagram comprises a hierarchical view of relationships between the selected file and other files of the program having a plurality of nodes. The UML diagram displayed in the graphical user interface enables a user to navigate to a particular file of the program by selecting one of the nodes of the UML diagram.
The system for displaying UML diagrams of software programs includes a compiler, a manager module, and a browser interface. The compiler compiles a software program containing a plurality of objects and generates information regarding relationships amongst the plurality of objects in the program. The manager module receives requests for a display of a UML diagram of a particular object and generates a diagram of relationships between this particular object and other objects of the program based upon the relationship information generated by the compiler. The diagram is generated by the manager module using Unified Modeling Language (UML) notation. The browser interface displays the generated UML diagram and enables a user to navigate to either source code or a UML diagram of a particular object displayed in the UML diagram by selecting the object in the browser interface.